﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UWP.Douban.Models;
using Windows.UI.Xaml.Navigation;

namespace UWP.Douban.Mvvm
{
    public class DouImVm:BaseVm
    {

        
        public DouImVm()
        {
            DouLastMails = new ObservableCollection<DouLastMail>();
        }

        public ObservableCollection<DouLastMail> DouLastMails { get;private set; }

        public override async void OnNavigatedTo(NavigationEventArgs e)
        {
            var threads = await SampleData.SampleDataUtil.GetDouLastMails();


            foreach (var item in threads)
            {
                DouLastMails.Add(item);
            }
            base.OnNavigatedTo(e);
        }
    }
}
